package com.foreknow.mapping;

import com.foreknow.model.Business;

import java.sql.ResultSet;
import java.sql.SQLException;

/**
 * @author shkstart
 * @create 2021-08-05 15:41
 */
public class BusinessMapping implements EntityMapping{
    @Override
    public Object mapping(ResultSet rs) throws SQLException {
        Business buss=new Business();
        buss.setBusinessId(rs.getInt("businessId"));
        buss.setPassword(rs.getString("password"));
        buss.setBusinessName(rs.getString("businessName"));
        buss.setBusinessAddress(rs.getString("businessAddress"));
        buss.setBusinessExplain(rs.getString("businessExplain"));
        buss.setStarPrice(rs.getDouble("starPrice"));
        buss.setDeliveryPrice(rs.getDouble("deliverPrice"));
        return buss;

    }
}
